// $ANTLR 3.2 Sep 23, 2009 12:02:23 /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g 2011-01-24 12:12:07

    package com.deepclassifieds.daas.ql;


import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;


import org.antlr.runtime.tree.*;

/**
 * Grammar for DAAS QL
 */
public class DaasqlParser extends Parser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "SINGLE_QUOTED_STRING", "DOUBLE_QUOTED_STRING", "INTEGER", "DECIMAL", "DOUBLE", "OR", "LPAR", "COMMA", "RPAR", "AND", "EQ", "NE", "GT", "GE", "LT", "LE", "LIKE", "ASC", "DESC", "IRI_REFERENCE", "EXPONENT", "POSITIVE_INTEGER", "POSITIVE_DECIMAL", "POSITIVE_DOUBLE", "NEGATIVE_INTEGER", "NEGATIVE_DECIMAL", "NEGATIVE_DOUBLE", "ESCAPE_CHARACTER", "PNAME_CHARS_PLUS_UNDERSCORE", "'0'", "'9'"
    };
    public static final int DOUBLE_QUOTED_STRING=5;
    public static final int INTEGER=6;
    public static final int GE=17;
    public static final int EXPONENT=24;
    public static final int LT=18;
    public static final int ASC=21;
    public static final int SINGLE_QUOTED_STRING=4;
    public static final int PNAME_CHARS_PLUS_UNDERSCORE=32;
    public static final int POSITIVE_DECIMAL=26;
    public static final int AND=13;
    public static final int EOF=-1;
    public static final int NEGATIVE_INTEGER=28;
    public static final int ESCAPE_CHARACTER=31;
    public static final int T__33=33;
    public static final int T__34=34;
    public static final int LPAR=10;
    public static final int DECIMAL=7;
    public static final int COMMA=11;
    public static final int NEGATIVE_DOUBLE=30;
    public static final int IRI_REFERENCE=23;
    public static final int OR=9;
    public static final int DOUBLE=8;
    public static final int POSITIVE_INTEGER=25;
    public static final int GT=16;
    public static final int RPAR=12;
    public static final int DESC=22;
    public static final int EQ=14;
    public static final int LE=19;
    public static final int LIKE=20;
    public static final int NEGATIVE_DECIMAL=29;
    public static final int POSITIVE_DOUBLE=27;
    public static final int NE=15;

    // delegates
    // delegators


        public DaasqlParser(TokenStream input) {
            this(input, new RecognizerSharedState());
        }
        public DaasqlParser(TokenStream input, RecognizerSharedState state) {
            super(input, state);
             
        }
        
    protected TreeAdaptor adaptor = new CommonTreeAdaptor();

    public void setTreeAdaptor(TreeAdaptor adaptor) {
        this.adaptor = adaptor;
    }
    public TreeAdaptor getTreeAdaptor() {
        return adaptor;
    }

    public String[] getTokenNames() { return DaasqlParser.tokenNames; }
    public String getGrammarFileName() { return "/Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g"; }


        protected void mismatch( IntStream input, int tokenType, BitSet follow ) throws RecognitionException {
            throw new MismatchedTokenException( tokenType, input );
        }
        
        public void recoverFromMismatchedSet( IntStream input, RecognitionException ex, BitSet follow )
            throws RecognitionException {
            
            throw ex;
        }


    public static class string_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "string"
    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:48:1: string : ( SINGLE_QUOTED_STRING | DOUBLE_QUOTED_STRING );
    public final DaasqlParser.string_return string() throws RecognitionException {
        DaasqlParser.string_return retval = new DaasqlParser.string_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token set1=null;

        Object set1_tree=null;

        try {
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:48:9: ( SINGLE_QUOTED_STRING | DOUBLE_QUOTED_STRING )
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:
            {
            root_0 = (Object)adaptor.nil();

            set1=(Token)input.LT(1);
            if ( (input.LA(1)>=SINGLE_QUOTED_STRING && input.LA(1)<=DOUBLE_QUOTED_STRING) ) {
                input.consume();
                adaptor.addChild(root_0, (Object)adaptor.create(set1));
                state.errorRecovery=false;
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                throw mse;
            }


            }

            retval.stop = input.LT(-1);

            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }

            catch ( RecognitionException ex ) {
                throw ex;
            }
        finally {
        }
        return retval;
    }
    // $ANTLR end "string"

    public static class value_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "value"
    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:56:1: value : ( string | number );
    public final DaasqlParser.value_return value() throws RecognitionException {
        DaasqlParser.value_return retval = new DaasqlParser.value_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        DaasqlParser.string_return string2 = null;

        DaasqlParser.number_return number3 = null;



        try {
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:56:8: ( string | number )
            int alt1=2;
            int LA1_0 = input.LA(1);

            if ( ((LA1_0>=SINGLE_QUOTED_STRING && LA1_0<=DOUBLE_QUOTED_STRING)) ) {
                alt1=1;
            }
            else if ( ((LA1_0>=INTEGER && LA1_0<=DOUBLE)) ) {
                alt1=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 1, 0, input);

                throw nvae;
            }
            switch (alt1) {
                case 1 :
                    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:56:10: string
                    {
                    root_0 = (Object)adaptor.nil();

                    pushFollow(FOLLOW_string_in_value104);
                    string2=string();

                    state._fsp--;

                    adaptor.addChild(root_0, string2.getTree());

                    }
                    break;
                case 2 :
                    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:57:4: number
                    {
                    root_0 = (Object)adaptor.nil();

                    pushFollow(FOLLOW_number_in_value109);
                    number3=number();

                    state._fsp--;

                    adaptor.addChild(root_0, number3.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);

            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }

            catch ( RecognitionException ex ) {
                throw ex;
            }
        finally {
        }
        return retval;
    }
    // $ANTLR end "value"

    public static class number_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "number"
    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:60:1: number : ( INTEGER | DECIMAL | DOUBLE );
    public final DaasqlParser.number_return number() throws RecognitionException {
        DaasqlParser.number_return retval = new DaasqlParser.number_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token set4=null;

        Object set4_tree=null;

        try {
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:60:9: ( INTEGER | DECIMAL | DOUBLE )
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:
            {
            root_0 = (Object)adaptor.nil();

            set4=(Token)input.LT(1);
            if ( (input.LA(1)>=INTEGER && input.LA(1)<=DOUBLE) ) {
                input.consume();
                adaptor.addChild(root_0, (Object)adaptor.create(set4));
                state.errorRecovery=false;
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                throw mse;
            }


            }

            retval.stop = input.LT(-1);

            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }

            catch ( RecognitionException ex ) {
                throw ex;
            }
        finally {
        }
        return retval;
    }
    // $ANTLR end "number"

    public static class where_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "where"
    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:65:1: where : expr ;
    public final DaasqlParser.where_return where() throws RecognitionException {
        DaasqlParser.where_return retval = new DaasqlParser.where_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        DaasqlParser.expr_return expr5 = null;



        try {
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:65:8: ( expr )
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:65:10: expr
            {
            root_0 = (Object)adaptor.nil();

            pushFollow(FOLLOW_expr_in_where145);
            expr5=expr();

            state._fsp--;

            adaptor.addChild(root_0, expr5.getTree());

            }

            retval.stop = input.LT(-1);

            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }

            catch ( RecognitionException ex ) {
                throw ex;
            }
        finally {
        }
        return retval;
    }
    // $ANTLR end "where"

    public static class expr_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "expr"
    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:68:1: expr : ( exprOR | exprAND | exprEQ | exprNE | exprGT | exprGE | exprLT | exprLE | exprLIKE );
    public final DaasqlParser.expr_return expr() throws RecognitionException {
        DaasqlParser.expr_return retval = new DaasqlParser.expr_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        DaasqlParser.exprOR_return exprOR6 = null;

        DaasqlParser.exprAND_return exprAND7 = null;

        DaasqlParser.exprEQ_return exprEQ8 = null;

        DaasqlParser.exprNE_return exprNE9 = null;

        DaasqlParser.exprGT_return exprGT10 = null;

        DaasqlParser.exprGE_return exprGE11 = null;

        DaasqlParser.exprLT_return exprLT12 = null;

        DaasqlParser.exprLE_return exprLE13 = null;

        DaasqlParser.exprLIKE_return exprLIKE14 = null;



        try {
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:68:7: ( exprOR | exprAND | exprEQ | exprNE | exprGT | exprGE | exprLT | exprLE | exprLIKE )
            int alt2=9;
            alt2 = dfa2.predict(input);
            switch (alt2) {
                case 1 :
                    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:68:10: exprOR
                    {
                    root_0 = (Object)adaptor.nil();

                    pushFollow(FOLLOW_exprOR_in_expr157);
                    exprOR6=exprOR();

                    state._fsp--;

                    adaptor.addChild(root_0, exprOR6.getTree());

                    }
                    break;
                case 2 :
                    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:69:4: exprAND
                    {
                    root_0 = (Object)adaptor.nil();

                    pushFollow(FOLLOW_exprAND_in_expr162);
                    exprAND7=exprAND();

                    state._fsp--;

                    adaptor.addChild(root_0, exprAND7.getTree());

                    }
                    break;
                case 3 :
                    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:70:4: exprEQ
                    {
                    root_0 = (Object)adaptor.nil();

                    pushFollow(FOLLOW_exprEQ_in_expr167);
                    exprEQ8=exprEQ();

                    state._fsp--;

                    adaptor.addChild(root_0, exprEQ8.getTree());

                    }
                    break;
                case 4 :
                    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:71:4: exprNE
                    {
                    root_0 = (Object)adaptor.nil();

                    pushFollow(FOLLOW_exprNE_in_expr172);
                    exprNE9=exprNE();

                    state._fsp--;

                    adaptor.addChild(root_0, exprNE9.getTree());

                    }
                    break;
                case 5 :
                    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:72:4: exprGT
                    {
                    root_0 = (Object)adaptor.nil();

                    pushFollow(FOLLOW_exprGT_in_expr177);
                    exprGT10=exprGT();

                    state._fsp--;

                    adaptor.addChild(root_0, exprGT10.getTree());

                    }
                    break;
                case 6 :
                    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:73:4: exprGE
                    {
                    root_0 = (Object)adaptor.nil();

                    pushFollow(FOLLOW_exprGE_in_expr182);
                    exprGE11=exprGE();

                    state._fsp--;

                    adaptor.addChild(root_0, exprGE11.getTree());

                    }
                    break;
                case 7 :
                    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:74:4: exprLT
                    {
                    root_0 = (Object)adaptor.nil();

                    pushFollow(FOLLOW_exprLT_in_expr187);
                    exprLT12=exprLT();

                    state._fsp--;

                    adaptor.addChild(root_0, exprLT12.getTree());

                    }
                    break;
                case 8 :
                    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:75:4: exprLE
                    {
                    root_0 = (Object)adaptor.nil();

                    pushFollow(FOLLOW_exprLE_in_expr192);
                    exprLE13=exprLE();

                    state._fsp--;

                    adaptor.addChild(root_0, exprLE13.getTree());

                    }
                    break;
                case 9 :
                    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:76:4: exprLIKE
                    {
                    root_0 = (Object)adaptor.nil();

                    pushFollow(FOLLOW_exprLIKE_in_expr197);
                    exprLIKE14=exprLIKE();

                    state._fsp--;

                    adaptor.addChild(root_0, exprLIKE14.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);

            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }

            catch ( RecognitionException ex ) {
                throw ex;
            }
        finally {
        }
        return retval;
    }
    // $ANTLR end "expr"

    public static class exprOR_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "exprOR"
    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:79:1: exprOR : OR LPAR expr COMMA expr RPAR ;
    public final DaasqlParser.exprOR_return exprOR() throws RecognitionException {
        DaasqlParser.exprOR_return retval = new DaasqlParser.exprOR_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token OR15=null;
        Token LPAR16=null;
        Token COMMA18=null;
        Token RPAR20=null;
        DaasqlParser.expr_return expr17 = null;

        DaasqlParser.expr_return expr19 = null;


        Object OR15_tree=null;
        Object LPAR16_tree=null;
        Object COMMA18_tree=null;
        Object RPAR20_tree=null;

        try {
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:79:9: ( OR LPAR expr COMMA expr RPAR )
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:79:13: OR LPAR expr COMMA expr RPAR
            {
            root_0 = (Object)adaptor.nil();

            OR15=(Token)match(input,OR,FOLLOW_OR_in_exprOR214); 
            OR15_tree = (Object)adaptor.create(OR15);
            adaptor.addChild(root_0, OR15_tree);

            LPAR16=(Token)match(input,LPAR,FOLLOW_LPAR_in_exprOR216); 
            LPAR16_tree = (Object)adaptor.create(LPAR16);
            adaptor.addChild(root_0, LPAR16_tree);

            pushFollow(FOLLOW_expr_in_exprOR218);
            expr17=expr();

            state._fsp--;

            adaptor.addChild(root_0, expr17.getTree());
            COMMA18=(Token)match(input,COMMA,FOLLOW_COMMA_in_exprOR220); 
            COMMA18_tree = (Object)adaptor.create(COMMA18);
            adaptor.addChild(root_0, COMMA18_tree);

            pushFollow(FOLLOW_expr_in_exprOR222);
            expr19=expr();

            state._fsp--;

            adaptor.addChild(root_0, expr19.getTree());
            RPAR20=(Token)match(input,RPAR,FOLLOW_RPAR_in_exprOR224); 
            RPAR20_tree = (Object)adaptor.create(RPAR20);
            adaptor.addChild(root_0, RPAR20_tree);


            }

            retval.stop = input.LT(-1);

            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }

            catch ( RecognitionException ex ) {
                throw ex;
            }
        finally {
        }
        return retval;
    }
    // $ANTLR end "exprOR"

    public static class exprAND_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "exprAND"
    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:82:1: exprAND : AND LPAR expr COMMA expr RPAR ;
    public final DaasqlParser.exprAND_return exprAND() throws RecognitionException {
        DaasqlParser.exprAND_return retval = new DaasqlParser.exprAND_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token AND21=null;
        Token LPAR22=null;
        Token COMMA24=null;
        Token RPAR26=null;
        DaasqlParser.expr_return expr23 = null;

        DaasqlParser.expr_return expr25 = null;


        Object AND21_tree=null;
        Object LPAR22_tree=null;
        Object COMMA24_tree=null;
        Object RPAR26_tree=null;

        try {
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:82:9: ( AND LPAR expr COMMA expr RPAR )
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:82:12: AND LPAR expr COMMA expr RPAR
            {
            root_0 = (Object)adaptor.nil();

            AND21=(Token)match(input,AND,FOLLOW_AND_in_exprAND241); 
            AND21_tree = (Object)adaptor.create(AND21);
            adaptor.addChild(root_0, AND21_tree);

            LPAR22=(Token)match(input,LPAR,FOLLOW_LPAR_in_exprAND243); 
            LPAR22_tree = (Object)adaptor.create(LPAR22);
            adaptor.addChild(root_0, LPAR22_tree);

            pushFollow(FOLLOW_expr_in_exprAND245);
            expr23=expr();

            state._fsp--;

            adaptor.addChild(root_0, expr23.getTree());
            COMMA24=(Token)match(input,COMMA,FOLLOW_COMMA_in_exprAND247); 
            COMMA24_tree = (Object)adaptor.create(COMMA24);
            adaptor.addChild(root_0, COMMA24_tree);

            pushFollow(FOLLOW_expr_in_exprAND249);
            expr25=expr();

            state._fsp--;

            adaptor.addChild(root_0, expr25.getTree());
            RPAR26=(Token)match(input,RPAR,FOLLOW_RPAR_in_exprAND251); 
            RPAR26_tree = (Object)adaptor.create(RPAR26);
            adaptor.addChild(root_0, RPAR26_tree);


            }

            retval.stop = input.LT(-1);

            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }

            catch ( RecognitionException ex ) {
                throw ex;
            }
        finally {
        }
        return retval;
    }
    // $ANTLR end "exprAND"

    public static class exprEQ_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "exprEQ"
    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:85:1: exprEQ : EQ LPAR name COMMA value RPAR ;
    public final DaasqlParser.exprEQ_return exprEQ() throws RecognitionException {
        DaasqlParser.exprEQ_return retval = new DaasqlParser.exprEQ_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token EQ27=null;
        Token LPAR28=null;
        Token COMMA30=null;
        Token RPAR32=null;
        DaasqlParser.name_return name29 = null;

        DaasqlParser.value_return value31 = null;


        Object EQ27_tree=null;
        Object LPAR28_tree=null;
        Object COMMA30_tree=null;
        Object RPAR32_tree=null;

        try {
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:85:9: ( EQ LPAR name COMMA value RPAR )
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:85:13: EQ LPAR name COMMA value RPAR
            {
            root_0 = (Object)adaptor.nil();

            EQ27=(Token)match(input,EQ,FOLLOW_EQ_in_exprEQ268); 
            EQ27_tree = (Object)adaptor.create(EQ27);
            adaptor.addChild(root_0, EQ27_tree);

            LPAR28=(Token)match(input,LPAR,FOLLOW_LPAR_in_exprEQ270); 
            LPAR28_tree = (Object)adaptor.create(LPAR28);
            adaptor.addChild(root_0, LPAR28_tree);

            pushFollow(FOLLOW_name_in_exprEQ272);
            name29=name();

            state._fsp--;

            adaptor.addChild(root_0, name29.getTree());
            COMMA30=(Token)match(input,COMMA,FOLLOW_COMMA_in_exprEQ274); 
            COMMA30_tree = (Object)adaptor.create(COMMA30);
            adaptor.addChild(root_0, COMMA30_tree);

            pushFollow(FOLLOW_value_in_exprEQ276);
            value31=value();

            state._fsp--;

            adaptor.addChild(root_0, value31.getTree());
            RPAR32=(Token)match(input,RPAR,FOLLOW_RPAR_in_exprEQ278); 
            RPAR32_tree = (Object)adaptor.create(RPAR32);
            adaptor.addChild(root_0, RPAR32_tree);


            }

            retval.stop = input.LT(-1);

            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }

            catch ( RecognitionException ex ) {
                throw ex;
            }
        finally {
        }
        return retval;
    }
    // $ANTLR end "exprEQ"

    public static class exprNE_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "exprNE"
    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:88:1: exprNE : NE LPAR name COMMA value RPAR ;
    public final DaasqlParser.exprNE_return exprNE() throws RecognitionException {
        DaasqlParser.exprNE_return retval = new DaasqlParser.exprNE_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token NE33=null;
        Token LPAR34=null;
        Token COMMA36=null;
        Token RPAR38=null;
        DaasqlParser.name_return name35 = null;

        DaasqlParser.value_return value37 = null;


        Object NE33_tree=null;
        Object LPAR34_tree=null;
        Object COMMA36_tree=null;
        Object RPAR38_tree=null;

        try {
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:88:9: ( NE LPAR name COMMA value RPAR )
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:88:13: NE LPAR name COMMA value RPAR
            {
            root_0 = (Object)adaptor.nil();

            NE33=(Token)match(input,NE,FOLLOW_NE_in_exprNE291); 
            NE33_tree = (Object)adaptor.create(NE33);
            adaptor.addChild(root_0, NE33_tree);

            LPAR34=(Token)match(input,LPAR,FOLLOW_LPAR_in_exprNE293); 
            LPAR34_tree = (Object)adaptor.create(LPAR34);
            adaptor.addChild(root_0, LPAR34_tree);

            pushFollow(FOLLOW_name_in_exprNE295);
            name35=name();

            state._fsp--;

            adaptor.addChild(root_0, name35.getTree());
            COMMA36=(Token)match(input,COMMA,FOLLOW_COMMA_in_exprNE297); 
            COMMA36_tree = (Object)adaptor.create(COMMA36);
            adaptor.addChild(root_0, COMMA36_tree);

            pushFollow(FOLLOW_value_in_exprNE299);
            value37=value();

            state._fsp--;

            adaptor.addChild(root_0, value37.getTree());
            RPAR38=(Token)match(input,RPAR,FOLLOW_RPAR_in_exprNE301); 
            RPAR38_tree = (Object)adaptor.create(RPAR38);
            adaptor.addChild(root_0, RPAR38_tree);


            }

            retval.stop = input.LT(-1);

            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }

            catch ( RecognitionException ex ) {
                throw ex;
            }
        finally {
        }
        return retval;
    }
    // $ANTLR end "exprNE"

    public static class exprGT_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "exprGT"
    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:91:1: exprGT : GT LPAR name COMMA value RPAR ;
    public final DaasqlParser.exprGT_return exprGT() throws RecognitionException {
        DaasqlParser.exprGT_return retval = new DaasqlParser.exprGT_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token GT39=null;
        Token LPAR40=null;
        Token COMMA42=null;
        Token RPAR44=null;
        DaasqlParser.name_return name41 = null;

        DaasqlParser.value_return value43 = null;


        Object GT39_tree=null;
        Object LPAR40_tree=null;
        Object COMMA42_tree=null;
        Object RPAR44_tree=null;

        try {
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:91:9: ( GT LPAR name COMMA value RPAR )
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:91:13: GT LPAR name COMMA value RPAR
            {
            root_0 = (Object)adaptor.nil();

            GT39=(Token)match(input,GT,FOLLOW_GT_in_exprGT314); 
            GT39_tree = (Object)adaptor.create(GT39);
            adaptor.addChild(root_0, GT39_tree);

            LPAR40=(Token)match(input,LPAR,FOLLOW_LPAR_in_exprGT316); 
            LPAR40_tree = (Object)adaptor.create(LPAR40);
            adaptor.addChild(root_0, LPAR40_tree);

            pushFollow(FOLLOW_name_in_exprGT318);
            name41=name();

            state._fsp--;

            adaptor.addChild(root_0, name41.getTree());
            COMMA42=(Token)match(input,COMMA,FOLLOW_COMMA_in_exprGT320); 
            COMMA42_tree = (Object)adaptor.create(COMMA42);
            adaptor.addChild(root_0, COMMA42_tree);

            pushFollow(FOLLOW_value_in_exprGT322);
            value43=value();

            state._fsp--;

            adaptor.addChild(root_0, value43.getTree());
            RPAR44=(Token)match(input,RPAR,FOLLOW_RPAR_in_exprGT324); 
            RPAR44_tree = (Object)adaptor.create(RPAR44);
            adaptor.addChild(root_0, RPAR44_tree);


            }

            retval.stop = input.LT(-1);

            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }

            catch ( RecognitionException ex ) {
                throw ex;
            }
        finally {
        }
        return retval;
    }
    // $ANTLR end "exprGT"

    public static class exprGE_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "exprGE"
    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:94:1: exprGE : GE LPAR name COMMA value RPAR ;
    public final DaasqlParser.exprGE_return exprGE() throws RecognitionException {
        DaasqlParser.exprGE_return retval = new DaasqlParser.exprGE_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token GE45=null;
        Token LPAR46=null;
        Token COMMA48=null;
        Token RPAR50=null;
        DaasqlParser.name_return name47 = null;

        DaasqlParser.value_return value49 = null;


        Object GE45_tree=null;
        Object LPAR46_tree=null;
        Object COMMA48_tree=null;
        Object RPAR50_tree=null;

        try {
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:94:9: ( GE LPAR name COMMA value RPAR )
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:94:13: GE LPAR name COMMA value RPAR
            {
            root_0 = (Object)adaptor.nil();

            GE45=(Token)match(input,GE,FOLLOW_GE_in_exprGE337); 
            GE45_tree = (Object)adaptor.create(GE45);
            adaptor.addChild(root_0, GE45_tree);

            LPAR46=(Token)match(input,LPAR,FOLLOW_LPAR_in_exprGE339); 
            LPAR46_tree = (Object)adaptor.create(LPAR46);
            adaptor.addChild(root_0, LPAR46_tree);

            pushFollow(FOLLOW_name_in_exprGE341);
            name47=name();

            state._fsp--;

            adaptor.addChild(root_0, name47.getTree());
            COMMA48=(Token)match(input,COMMA,FOLLOW_COMMA_in_exprGE343); 
            COMMA48_tree = (Object)adaptor.create(COMMA48);
            adaptor.addChild(root_0, COMMA48_tree);

            pushFollow(FOLLOW_value_in_exprGE345);
            value49=value();

            state._fsp--;

            adaptor.addChild(root_0, value49.getTree());
            RPAR50=(Token)match(input,RPAR,FOLLOW_RPAR_in_exprGE347); 
            RPAR50_tree = (Object)adaptor.create(RPAR50);
            adaptor.addChild(root_0, RPAR50_tree);


            }

            retval.stop = input.LT(-1);

            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }

            catch ( RecognitionException ex ) {
                throw ex;
            }
        finally {
        }
        return retval;
    }
    // $ANTLR end "exprGE"

    public static class exprLT_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "exprLT"
    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:97:1: exprLT : LT LPAR name COMMA value RPAR ;
    public final DaasqlParser.exprLT_return exprLT() throws RecognitionException {
        DaasqlParser.exprLT_return retval = new DaasqlParser.exprLT_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token LT51=null;
        Token LPAR52=null;
        Token COMMA54=null;
        Token RPAR56=null;
        DaasqlParser.name_return name53 = null;

        DaasqlParser.value_return value55 = null;


        Object LT51_tree=null;
        Object LPAR52_tree=null;
        Object COMMA54_tree=null;
        Object RPAR56_tree=null;

        try {
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:97:9: ( LT LPAR name COMMA value RPAR )
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:97:13: LT LPAR name COMMA value RPAR
            {
            root_0 = (Object)adaptor.nil();

            LT51=(Token)match(input,LT,FOLLOW_LT_in_exprLT360); 
            LT51_tree = (Object)adaptor.create(LT51);
            adaptor.addChild(root_0, LT51_tree);

            LPAR52=(Token)match(input,LPAR,FOLLOW_LPAR_in_exprLT362); 
            LPAR52_tree = (Object)adaptor.create(LPAR52);
            adaptor.addChild(root_0, LPAR52_tree);

            pushFollow(FOLLOW_name_in_exprLT364);
            name53=name();

            state._fsp--;

            adaptor.addChild(root_0, name53.getTree());
            COMMA54=(Token)match(input,COMMA,FOLLOW_COMMA_in_exprLT366); 
            COMMA54_tree = (Object)adaptor.create(COMMA54);
            adaptor.addChild(root_0, COMMA54_tree);

            pushFollow(FOLLOW_value_in_exprLT368);
            value55=value();

            state._fsp--;

            adaptor.addChild(root_0, value55.getTree());
            RPAR56=(Token)match(input,RPAR,FOLLOW_RPAR_in_exprLT370); 
            RPAR56_tree = (Object)adaptor.create(RPAR56);
            adaptor.addChild(root_0, RPAR56_tree);


            }

            retval.stop = input.LT(-1);

            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }

            catch ( RecognitionException ex ) {
                throw ex;
            }
        finally {
        }
        return retval;
    }
    // $ANTLR end "exprLT"

    public static class exprLE_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "exprLE"
    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:100:1: exprLE : LE LPAR name COMMA value RPAR ;
    public final DaasqlParser.exprLE_return exprLE() throws RecognitionException {
        DaasqlParser.exprLE_return retval = new DaasqlParser.exprLE_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token LE57=null;
        Token LPAR58=null;
        Token COMMA60=null;
        Token RPAR62=null;
        DaasqlParser.name_return name59 = null;

        DaasqlParser.value_return value61 = null;


        Object LE57_tree=null;
        Object LPAR58_tree=null;
        Object COMMA60_tree=null;
        Object RPAR62_tree=null;

        try {
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:100:9: ( LE LPAR name COMMA value RPAR )
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:100:13: LE LPAR name COMMA value RPAR
            {
            root_0 = (Object)adaptor.nil();

            LE57=(Token)match(input,LE,FOLLOW_LE_in_exprLE384); 
            LE57_tree = (Object)adaptor.create(LE57);
            adaptor.addChild(root_0, LE57_tree);

            LPAR58=(Token)match(input,LPAR,FOLLOW_LPAR_in_exprLE386); 
            LPAR58_tree = (Object)adaptor.create(LPAR58);
            adaptor.addChild(root_0, LPAR58_tree);

            pushFollow(FOLLOW_name_in_exprLE388);
            name59=name();

            state._fsp--;

            adaptor.addChild(root_0, name59.getTree());
            COMMA60=(Token)match(input,COMMA,FOLLOW_COMMA_in_exprLE390); 
            COMMA60_tree = (Object)adaptor.create(COMMA60);
            adaptor.addChild(root_0, COMMA60_tree);

            pushFollow(FOLLOW_value_in_exprLE392);
            value61=value();

            state._fsp--;

            adaptor.addChild(root_0, value61.getTree());
            RPAR62=(Token)match(input,RPAR,FOLLOW_RPAR_in_exprLE394); 
            RPAR62_tree = (Object)adaptor.create(RPAR62);
            adaptor.addChild(root_0, RPAR62_tree);


            }

            retval.stop = input.LT(-1);

            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }

            catch ( RecognitionException ex ) {
                throw ex;
            }
        finally {
        }
        return retval;
    }
    // $ANTLR end "exprLE"

    public static class exprLIKE_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "exprLIKE"
    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:103:1: exprLIKE : LIKE LPAR name COMMA string RPAR ;
    public final DaasqlParser.exprLIKE_return exprLIKE() throws RecognitionException {
        DaasqlParser.exprLIKE_return retval = new DaasqlParser.exprLIKE_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token LIKE63=null;
        Token LPAR64=null;
        Token COMMA66=null;
        Token RPAR68=null;
        DaasqlParser.name_return name65 = null;

        DaasqlParser.string_return string67 = null;


        Object LIKE63_tree=null;
        Object LPAR64_tree=null;
        Object COMMA66_tree=null;
        Object RPAR68_tree=null;

        try {
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:103:10: ( LIKE LPAR name COMMA string RPAR )
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:103:12: LIKE LPAR name COMMA string RPAR
            {
            root_0 = (Object)adaptor.nil();

            LIKE63=(Token)match(input,LIKE,FOLLOW_LIKE_in_exprLIKE404); 
            LIKE63_tree = (Object)adaptor.create(LIKE63);
            adaptor.addChild(root_0, LIKE63_tree);

            LPAR64=(Token)match(input,LPAR,FOLLOW_LPAR_in_exprLIKE406); 
            LPAR64_tree = (Object)adaptor.create(LPAR64);
            adaptor.addChild(root_0, LPAR64_tree);

            pushFollow(FOLLOW_name_in_exprLIKE408);
            name65=name();

            state._fsp--;

            adaptor.addChild(root_0, name65.getTree());
            COMMA66=(Token)match(input,COMMA,FOLLOW_COMMA_in_exprLIKE410); 
            COMMA66_tree = (Object)adaptor.create(COMMA66);
            adaptor.addChild(root_0, COMMA66_tree);

            pushFollow(FOLLOW_string_in_exprLIKE412);
            string67=string();

            state._fsp--;

            adaptor.addChild(root_0, string67.getTree());
            RPAR68=(Token)match(input,RPAR,FOLLOW_RPAR_in_exprLIKE414); 
            RPAR68_tree = (Object)adaptor.create(RPAR68);
            adaptor.addChild(root_0, RPAR68_tree);


            }

            retval.stop = input.LT(-1);

            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }

            catch ( RecognitionException ex ) {
                throw ex;
            }
        finally {
        }
        return retval;
    }
    // $ANTLR end "exprLIKE"

    public static class orderBy_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "orderBy"
    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:106:1: orderBy : ( orderByASC | orderByDESC );
    public final DaasqlParser.orderBy_return orderBy() throws RecognitionException {
        DaasqlParser.orderBy_return retval = new DaasqlParser.orderBy_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        DaasqlParser.orderByASC_return orderByASC69 = null;

        DaasqlParser.orderByDESC_return orderByDESC70 = null;



        try {
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:106:9: ( orderByASC | orderByDESC )
            int alt3=2;
            int LA3_0 = input.LA(1);

            if ( (LA3_0==ASC) ) {
                alt3=1;
            }
            else if ( (LA3_0==DESC) ) {
                alt3=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 3, 0, input);

                throw nvae;
            }
            switch (alt3) {
                case 1 :
                    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:106:11: orderByASC
                    {
                    root_0 = (Object)adaptor.nil();

                    pushFollow(FOLLOW_orderByASC_in_orderBy425);
                    orderByASC69=orderByASC();

                    state._fsp--;

                    adaptor.addChild(root_0, orderByASC69.getTree());

                    }
                    break;
                case 2 :
                    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:107:4: orderByDESC
                    {
                    root_0 = (Object)adaptor.nil();

                    pushFollow(FOLLOW_orderByDESC_in_orderBy431);
                    orderByDESC70=orderByDESC();

                    state._fsp--;

                    adaptor.addChild(root_0, orderByDESC70.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);

            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }

            catch ( RecognitionException ex ) {
                throw ex;
            }
        finally {
        }
        return retval;
    }
    // $ANTLR end "orderBy"

    public static class orderByASC_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "orderByASC"
    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:111:1: orderByASC : ASC '(' name ')' ;
    public final DaasqlParser.orderByASC_return orderByASC() throws RecognitionException {
        DaasqlParser.orderByASC_return retval = new DaasqlParser.orderByASC_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token ASC71=null;
        Token char_literal72=null;
        Token char_literal74=null;
        DaasqlParser.name_return name73 = null;


        Object ASC71_tree=null;
        Object char_literal72_tree=null;
        Object char_literal74_tree=null;

        try {
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:111:12: ( ASC '(' name ')' )
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:111:14: ASC '(' name ')'
            {
            root_0 = (Object)adaptor.nil();

            ASC71=(Token)match(input,ASC,FOLLOW_ASC_in_orderByASC448); 
            ASC71_tree = (Object)adaptor.create(ASC71);
            adaptor.addChild(root_0, ASC71_tree);

            char_literal72=(Token)match(input,LPAR,FOLLOW_LPAR_in_orderByASC450); 
            char_literal72_tree = (Object)adaptor.create(char_literal72);
            adaptor.addChild(root_0, char_literal72_tree);

            pushFollow(FOLLOW_name_in_orderByASC452);
            name73=name();

            state._fsp--;

            adaptor.addChild(root_0, name73.getTree());
            char_literal74=(Token)match(input,RPAR,FOLLOW_RPAR_in_orderByASC454); 
            char_literal74_tree = (Object)adaptor.create(char_literal74);
            adaptor.addChild(root_0, char_literal74_tree);


            }

            retval.stop = input.LT(-1);

            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }

            catch ( RecognitionException ex ) {
                throw ex;
            }
        finally {
        }
        return retval;
    }
    // $ANTLR end "orderByASC"

    public static class orderByDESC_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "orderByDESC"
    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:114:1: orderByDESC : DESC '(' name ')' ;
    public final DaasqlParser.orderByDESC_return orderByDESC() throws RecognitionException {
        DaasqlParser.orderByDESC_return retval = new DaasqlParser.orderByDESC_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token DESC75=null;
        Token char_literal76=null;
        Token char_literal78=null;
        DaasqlParser.name_return name77 = null;


        Object DESC75_tree=null;
        Object char_literal76_tree=null;
        Object char_literal78_tree=null;

        try {
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:114:13: ( DESC '(' name ')' )
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:114:15: DESC '(' name ')'
            {
            root_0 = (Object)adaptor.nil();

            DESC75=(Token)match(input,DESC,FOLLOW_DESC_in_orderByDESC464); 
            DESC75_tree = (Object)adaptor.create(DESC75);
            adaptor.addChild(root_0, DESC75_tree);

            char_literal76=(Token)match(input,LPAR,FOLLOW_LPAR_in_orderByDESC466); 
            char_literal76_tree = (Object)adaptor.create(char_literal76);
            adaptor.addChild(root_0, char_literal76_tree);

            pushFollow(FOLLOW_name_in_orderByDESC468);
            name77=name();

            state._fsp--;

            adaptor.addChild(root_0, name77.getTree());
            char_literal78=(Token)match(input,RPAR,FOLLOW_RPAR_in_orderByDESC470); 
            char_literal78_tree = (Object)adaptor.create(char_literal78);
            adaptor.addChild(root_0, char_literal78_tree);


            }

            retval.stop = input.LT(-1);

            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }

            catch ( RecognitionException ex ) {
                throw ex;
            }
        finally {
        }
        return retval;
    }
    // $ANTLR end "orderByDESC"

    public static class name_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "name"
    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:257:1: name : ( PNAME_CHARS_PLUS_UNDERSCORE | '0' .. '9' ) ( PNAME_CHARS_PLUS_UNDERSCORE | '0' .. '9' )* ;
    public final DaasqlParser.name_return name() throws RecognitionException {
        DaasqlParser.name_return retval = new DaasqlParser.name_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token set79=null;
        Token set80=null;

        Object set79_tree=null;
        Object set80_tree=null;

        try {
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:257:7: ( ( PNAME_CHARS_PLUS_UNDERSCORE | '0' .. '9' ) ( PNAME_CHARS_PLUS_UNDERSCORE | '0' .. '9' )* )
            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:257:9: ( PNAME_CHARS_PLUS_UNDERSCORE | '0' .. '9' ) ( PNAME_CHARS_PLUS_UNDERSCORE | '0' .. '9' )*
            {
            root_0 = (Object)adaptor.nil();

            set79=(Token)input.LT(1);
            if ( input.LA(1)==PNAME_CHARS_PLUS_UNDERSCORE ) {
                input.consume();
                adaptor.addChild(root_0, (Object)adaptor.create(set79));
                state.errorRecovery=false;
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                throw mse;
            }

            // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:258:6: ( PNAME_CHARS_PLUS_UNDERSCORE | '0' .. '9' )*
            loop4:
            do {
                int alt4=2;
                int LA4_0 = input.LA(1);

                if ( (LA4_0==PNAME_CHARS_PLUS_UNDERSCORE) ) {
                    alt4=1;
                }


                switch (alt4) {
            	case 1 :
            	    // /Users/nbarkhatov/p1views/daas/trunk/daas-ql/src/main/antlr/com/deepclassifieds/daas/ql/Daasql.g:
            	    {
            	    set80=(Token)input.LT(1);
            	    if ( input.LA(1)==PNAME_CHARS_PLUS_UNDERSCORE ) {
            	        input.consume();
            	        adaptor.addChild(root_0, (Object)adaptor.create(set80));
            	        state.errorRecovery=false;
            	    }
            	    else {
            	        MismatchedSetException mse = new MismatchedSetException(null,input);
            	        throw mse;
            	    }


            	    }
            	    break;

            	default :
            	    break loop4;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);

            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }

            catch ( RecognitionException ex ) {
                throw ex;
            }
        finally {
        }
        return retval;
    }
    // $ANTLR end "name"

    // Delegated rules


    protected DFA2 dfa2 = new DFA2(this);
    static final String DFA2_eotS =
        "\12\uffff";
    static final String DFA2_eofS =
        "\12\uffff";
    static final String DFA2_minS =
        "\1\11\11\uffff";
    static final String DFA2_maxS =
        "\1\24\11\uffff";
    static final String DFA2_acceptS =
        "\1\uffff\1\1\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\11";
    static final String DFA2_specialS =
        "\12\uffff}>";
    static final String[] DFA2_transitionS = {
            "\1\1\3\uffff\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\11",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static final short[] DFA2_eot = DFA.unpackEncodedString(DFA2_eotS);
    static final short[] DFA2_eof = DFA.unpackEncodedString(DFA2_eofS);
    static final char[] DFA2_min = DFA.unpackEncodedStringToUnsignedChars(DFA2_minS);
    static final char[] DFA2_max = DFA.unpackEncodedStringToUnsignedChars(DFA2_maxS);
    static final short[] DFA2_accept = DFA.unpackEncodedString(DFA2_acceptS);
    static final short[] DFA2_special = DFA.unpackEncodedString(DFA2_specialS);
    static final short[][] DFA2_transition;

    static {
        int numStates = DFA2_transitionS.length;
        DFA2_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA2_transition[i] = DFA.unpackEncodedString(DFA2_transitionS[i]);
        }
    }

    class DFA2 extends DFA {

        public DFA2(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 2;
            this.eot = DFA2_eot;
            this.eof = DFA2_eof;
            this.min = DFA2_min;
            this.max = DFA2_max;
            this.accept = DFA2_accept;
            this.special = DFA2_special;
            this.transition = DFA2_transition;
        }
        public String getDescription() {
            return "68:1: expr : ( exprOR | exprAND | exprEQ | exprNE | exprGT | exprGE | exprLT | exprLE | exprLIKE );";
        }
    }
 

    public static final BitSet FOLLOW_set_in_string0 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_string_in_value104 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_number_in_value109 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_set_in_number0 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_expr_in_where145 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_exprOR_in_expr157 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_exprAND_in_expr162 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_exprEQ_in_expr167 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_exprNE_in_expr172 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_exprGT_in_expr177 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_exprGE_in_expr182 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_exprLT_in_expr187 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_exprLE_in_expr192 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_exprLIKE_in_expr197 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_OR_in_exprOR214 = new BitSet(new long[]{0x0000000000000400L});
    public static final BitSet FOLLOW_LPAR_in_exprOR216 = new BitSet(new long[]{0x00000000001FE200L});
    public static final BitSet FOLLOW_expr_in_exprOR218 = new BitSet(new long[]{0x0000000000000800L});
    public static final BitSet FOLLOW_COMMA_in_exprOR220 = new BitSet(new long[]{0x00000000001FE200L});
    public static final BitSet FOLLOW_expr_in_exprOR222 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_RPAR_in_exprOR224 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_AND_in_exprAND241 = new BitSet(new long[]{0x0000000000000400L});
    public static final BitSet FOLLOW_LPAR_in_exprAND243 = new BitSet(new long[]{0x00000000001FE200L});
    public static final BitSet FOLLOW_expr_in_exprAND245 = new BitSet(new long[]{0x0000000000000800L});
    public static final BitSet FOLLOW_COMMA_in_exprAND247 = new BitSet(new long[]{0x00000000001FE200L});
    public static final BitSet FOLLOW_expr_in_exprAND249 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_RPAR_in_exprAND251 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_EQ_in_exprEQ268 = new BitSet(new long[]{0x0000000000000400L});
    public static final BitSet FOLLOW_LPAR_in_exprEQ270 = new BitSet(new long[]{0x0000000100000000L});
    public static final BitSet FOLLOW_name_in_exprEQ272 = new BitSet(new long[]{0x0000000000000800L});
    public static final BitSet FOLLOW_COMMA_in_exprEQ274 = new BitSet(new long[]{0x00000000000001F0L});
    public static final BitSet FOLLOW_value_in_exprEQ276 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_RPAR_in_exprEQ278 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NE_in_exprNE291 = new BitSet(new long[]{0x0000000000000400L});
    public static final BitSet FOLLOW_LPAR_in_exprNE293 = new BitSet(new long[]{0x0000000100000000L});
    public static final BitSet FOLLOW_name_in_exprNE295 = new BitSet(new long[]{0x0000000000000800L});
    public static final BitSet FOLLOW_COMMA_in_exprNE297 = new BitSet(new long[]{0x00000000000001F0L});
    public static final BitSet FOLLOW_value_in_exprNE299 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_RPAR_in_exprNE301 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_GT_in_exprGT314 = new BitSet(new long[]{0x0000000000000400L});
    public static final BitSet FOLLOW_LPAR_in_exprGT316 = new BitSet(new long[]{0x0000000100000000L});
    public static final BitSet FOLLOW_name_in_exprGT318 = new BitSet(new long[]{0x0000000000000800L});
    public static final BitSet FOLLOW_COMMA_in_exprGT320 = new BitSet(new long[]{0x00000000000001F0L});
    public static final BitSet FOLLOW_value_in_exprGT322 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_RPAR_in_exprGT324 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_GE_in_exprGE337 = new BitSet(new long[]{0x0000000000000400L});
    public static final BitSet FOLLOW_LPAR_in_exprGE339 = new BitSet(new long[]{0x0000000100000000L});
    public static final BitSet FOLLOW_name_in_exprGE341 = new BitSet(new long[]{0x0000000000000800L});
    public static final BitSet FOLLOW_COMMA_in_exprGE343 = new BitSet(new long[]{0x00000000000001F0L});
    public static final BitSet FOLLOW_value_in_exprGE345 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_RPAR_in_exprGE347 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LT_in_exprLT360 = new BitSet(new long[]{0x0000000000000400L});
    public static final BitSet FOLLOW_LPAR_in_exprLT362 = new BitSet(new long[]{0x0000000100000000L});
    public static final BitSet FOLLOW_name_in_exprLT364 = new BitSet(new long[]{0x0000000000000800L});
    public static final BitSet FOLLOW_COMMA_in_exprLT366 = new BitSet(new long[]{0x00000000000001F0L});
    public static final BitSet FOLLOW_value_in_exprLT368 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_RPAR_in_exprLT370 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LE_in_exprLE384 = new BitSet(new long[]{0x0000000000000400L});
    public static final BitSet FOLLOW_LPAR_in_exprLE386 = new BitSet(new long[]{0x0000000100000000L});
    public static final BitSet FOLLOW_name_in_exprLE388 = new BitSet(new long[]{0x0000000000000800L});
    public static final BitSet FOLLOW_COMMA_in_exprLE390 = new BitSet(new long[]{0x00000000000001F0L});
    public static final BitSet FOLLOW_value_in_exprLE392 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_RPAR_in_exprLE394 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LIKE_in_exprLIKE404 = new BitSet(new long[]{0x0000000000000400L});
    public static final BitSet FOLLOW_LPAR_in_exprLIKE406 = new BitSet(new long[]{0x0000000100000000L});
    public static final BitSet FOLLOW_name_in_exprLIKE408 = new BitSet(new long[]{0x0000000000000800L});
    public static final BitSet FOLLOW_COMMA_in_exprLIKE410 = new BitSet(new long[]{0x0000000000000030L});
    public static final BitSet FOLLOW_string_in_exprLIKE412 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_RPAR_in_exprLIKE414 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_orderByASC_in_orderBy425 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_orderByDESC_in_orderBy431 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ASC_in_orderByASC448 = new BitSet(new long[]{0x0000000000000400L});
    public static final BitSet FOLLOW_LPAR_in_orderByASC450 = new BitSet(new long[]{0x0000000100000000L});
    public static final BitSet FOLLOW_name_in_orderByASC452 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_RPAR_in_orderByASC454 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_DESC_in_orderByDESC464 = new BitSet(new long[]{0x0000000000000400L});
    public static final BitSet FOLLOW_LPAR_in_orderByDESC466 = new BitSet(new long[]{0x0000000100000000L});
    public static final BitSet FOLLOW_name_in_orderByDESC468 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_RPAR_in_orderByDESC470 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_set_in_name1209 = new BitSet(new long[]{0x0000000100000002L});
    public static final BitSet FOLLOW_set_in_name1228 = new BitSet(new long[]{0x0000000100000002L});

}